import React from 'react'
import { Link } from 'react-router-dom'

class NavTop extends React.Component{
    constructor(props){
        super(props)
        this.state={
            username: 'andy'
        }
    }
    render(){
        return(
            <div className="nav navbar-default top-navbar">
                111
                <div className="navbar-header">
                    <Link className="navbar-brand" to="/" >
                        <b>HAPPY</b><b>MMALL</b>
                    </Link>
                </div>
                <ul className="nav navbar-top-links  nav-right">
                    <li className="dropdown">
                        <a href="javascript:;" className="dropdown-toggle">
                            <i className="fa fa-user fa-fw"></i>
                            {
                                this.state.username ? <span>欢迎, {this.state.username}</span> : <span>欢迎您</span>
                            }
                            <i className="fa fa-caret-down"></i>
                        </a>
                    </li>
                </ul>
            </div>
        )
    }
}

export default  NavTop;